package vip.web3.admin.sys.vo.biz.export;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
import vip.web3.admin.common.export.LongToStr;
import vip.web3.admin.common.export.OrderStatusConverter;
import vip.web3.admin.common.export.WalletTypeConverter;
import vip.web3.common.utils.DateUtils;

import java.util.Date;


/**
 * @author lilei
 */
@Data
public class ExOrderVo {

    @ExcelProperty(value = "ID", index = 0)
    private Integer id;

    /**
     * 用户id
     */
    @ExcelProperty(value = "uid", index = 1)
    private Integer userId;

    /**
     * 账号
     */
    @ExcelProperty(value = "手机账号", index = 2)
    private String mobile;

    /**
     * 1 CNY 订单, 2 USDT 订单
     */
    @ExcelProperty(value = "订单类型", index = 3, converter = WalletTypeConverter.class)
    private Integer type;

    /**
     * 1 激活中, 0 已失效
     */
    @ExcelProperty(value = "状态", index = 4, converter = OrderStatusConverter.class)
    private Integer active;

    /**
     * 轮次 ID
     */
    @ExcelIgnore
    private Integer proId;

    /**
     * 商品名称
     */

    @ExcelProperty(value = "商品名称", index = 5)
    @ColumnWidth(25)
    private String proName;

    /**
     * 单价cny
     */
    @ExcelProperty(value = "单价cny", index = 6)
    private String priceCny;

    /**
     *
     */
    @ExcelProperty(value = "单价usdt", index = 7)
    private String priceUsdt;

    /**
     * 数量
     */
    @ExcelProperty(value = "数量", index = 8)
    private String quantity;

    /**
     * 总价
     */
    @ExcelProperty(value = "总价cny", index = 9)
    private String amountCny;

    /**
     * USDT 总价
     */
    @ExcelProperty(value = "总价usdt", index = 10)
    private String amountUsdt;

    /**
     * 收益率
     */
    @ExcelProperty(value = "收益率", index = 11)
    private String rate;

    /**
     * 收益金额 总价*日收益
     */
    @ExcelProperty(value = "收益金额", index = 12)
    private String income;

    /**
     * 总产量 = 产量 * 产出天数
     */
    @ExcelProperty(value = "总产量", index = 13)
    private String totalIncome;

    /**
     * 剩余产出
     */
    @ExcelProperty(value = "剩余产出", index = 14)
    private String leftIncome;

    /**
     * 产出总天数
     */
    @ExcelProperty(value = "产出总天数", index = 15)
    private Integer totalTimes;

    /**
     * 剩余发放天数
     */
    @ExcelProperty(value = "剩余发放天数", index = 16)
    private Integer leftTimes;


    /**
     * 是否结算 0 未结算, 1 已结算, 2待结算
     */
    @ExcelIgnore
    private Integer status;

    /**
     * 订单编号
     */
    @ExcelIgnore
    @ExcelProperty(value = "订单号", converter = LongToStr.class)
    private Long orderNo;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间", index = 17)
    @ColumnWidth(25)
    @DateTimeFormat(DateUtils.DATE_TIME_PATTERN)
    private Date createDate;

    /**
     * 更新时间
     */
    @ExcelIgnore
    private Date updateDate;
}
